<template>
    <div class="cart-list">
        <ScrollVue ref="scroll" class="content">
            <CartListItemVue v-for="(item,index) in cartList" :itemInfo="item"></CartListItemVue>
        </ScrollVue>
    </div>
</template>

<script>
    import ScrollVue from '@/components/common/scroll/Scroll.vue'
    import CartListItemVue from './CartListItem.vue'

import { mapGetters } from 'vuex'

    export default{
        name : 'CartList',
        components:{
            ScrollVue,
            CartListItemVue
        },
        computed : {
            ...mapGetters({
                cartList : 'cartList'
            })
        },
        activated(){
            this.$refs.scroll.refresh()
        }
    }
</script>

<style scoped>
.cart-list{
    height: calc(100% - 44px - 49px);
}

.content{
    height: 100%;
    overflow: hidden;
}
</style>